add override capabilities to repeated capabilities documentation - #2183
add override capabilities to repeated capabilities documentation#2183elebel-emerson wants to merge 20 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2183 +/- ##
=======================================
Coverage 88.09% 88.10%
=======================================
Files 88 88
Lines 22756 22765 +9
=======================================
+ Hits 20047 20056 +9
Misses 2709 2709
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Why are you changing the file modes of our metadata files? |
|
Note: if you pull the latest changes, the system tests will pass. |
I did not explicitly touch those files, doing |
|
Yeah, any system test failures are unrelated to your changes. You haven't touched the API or the System Tests. |
|
"overwrite" should be "override" (nim-python terminology) |
|
You are missing a NI-FAKE example |
Hopefully changed all instances of "overwrite" to "override"
Added unit tests in |
|
Your changes to metadata_add_all.py are causing related unit tests to fail. |
Should have fixed failures with Travic CI |
|
Why are you making a functional change? |
Pending some system_tests but everything should be up to date with main, let's hope the system tests do not fail again |
|
You should pull upstream/master. |
|
If you see any changes in the existing rep_caps.rst, that's probably not a good sign. |
Changed to remove all changes to the generated .rst files |
Should be up to date from main, pending pipeline tests |
| ${example.split('\n\n', 1)[0].replace('\n', '\n ')} | ||
|
|
||
| passes a string of :python:`'${prefix}0, ${prefix}1, ${prefix}2'` to the set attribute function. | ||
| % if '\n\n' in example: | ||
| ${textwrap.indent(example.split('\n\n', 1)[1], ' ')} |
There was a problem hiding this comment.
This works, but I think it would be less brittle if you did
{
"examples": [{
"code": "",
"description": ""},
{ ... },
]
}
or something like that.
That way you wouldn't have to mess with the newlines and we could handle multiline descriptions. Will a single line description get wrapped, anyway? Yes, it should be. But they're less clean and linting tools might not like long lines (I don't know).
| # actual_config = copy.deepcopy(config_input) | ||
| actual_config = copy.deepcopy(config_with_custom_rep_cap_documentation) | ||
| actual_config['use_locking'] = False | ||
| expected = copy.deepcopy(config_expected) | ||
| expected = copy.deepcopy(config_with_custom_rep_cap_documentation_expected) | ||
| # expected = copy.deepcopy(config_expected) |
There was a problem hiding this comment.
Having these commented out lines will just lead to confusion.
| assert "session.resources['dev0/res1'].channel_enabled = True" in rendered | ||
|
|
||
| # Generic auto-prefix guidance should be suppressed when override disables it. | ||
| # Custom documentation should overwrite the generic auto-prefix guidance. |
There was a problem hiding this comment.
| # Custom documentation should overwrite the generic auto-prefix guidance. | |
| # Custom documentation should override the generic auto-prefix guidance. |
ni-jfitzger
left a comment
There was a problem hiding this comment.
This is okay, but some of the template code feels a bit brittle.
- [ ] I've updated CHANGELOG.md if applicable.What does this Pull Request accomplish?
Change generated Repeated Capabilities documentation to support metadata-defined descriptions, examples, and identifier guidance for capability-specific behavior.
What testing has been done?
Manually testing change in config.py propagates to html documentation
Create a unit test